<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	  xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:f="http://xmlns.jcp.org/jsf/core">

<h:head>
	<title>Dettagli Pacchetto</title>
	<h:outputStylesheet library="TdTheme" name="css/style.css"/> 	
</h:head>

<h:body>
<h:form>      
	    <p:menubar>
	    	<p:menuitem value="Homepage" icon="ui-icon-contact" url="home.xhtml?faces-redirect=true"/> 
	         
	        <f:facet name="options">
	        	<p:outputLabel value="Benvenuto, #{utenteManagedBean.nome}" style="margin-right:10px"/>  
	            <p:commandButton value="Modifica Profilo" icon="ui-icon-contact" action="modifica_utente.xhtml?faces-redirect=true"/>
	            <p:commandButton value="Logout" icon="ui-icon-extlink" action="#{loginManagedBean.logout()}"/>  
	        </f:facet>  
	    </p:menubar>  
  	</h:form>
	<p:panel>
		<h2 style="margin-left:auto; margin-right:auto;">#{dettagliPPManagedBean.p.nome} - #{dettagliPPManagedBean.p.destinazione_pacchetto}</h2>
		<p:panel>
			<h:panelGrid columns="2" id="detailPage">
				<img src="../resources/TdTheme/img/hotel.png" style="height: 400px"/>
				<h:panelGrid style="width:100%">
					<p:outputLabel value="#{dettagliPPManagedBean.p.descrizione}" style="height: 150px; float:right;"/>
					<p:scrollPanel>
						<p:dataTable var="a" value="#{dettagliPPManagedBean.p.escursioni}">
							<p:column headerText="Nome Attività">
								<p:outputLabel value="#{a.nome}"/>
							</p:column>
							<p:column headerText="Descrizione">
								<p:outputLabel value="#{a.descrizione}"/>
							</p:column>
							<p:column headerText="Prezzo">
								<p:outputLabel value="#{a.prezzo} euro"/>
							</p:column>
						</p:dataTable>
					</p:scrollPanel>
					<p:outputLabel value="Prezzo base totale: #{dettagliPPManagedBean.p.prezzoBase} euro" style="float:right;"/>
					<h3>Durata: #{dettagliPPManagedBean.p.durata} giorni</h3>
				</h:panelGrid>
			</h:panelGrid>
			<h:form>
				<p:commandButton value="Personalizza" action="#{personalizzazioneManagedBean.iniziaPersonalizzazione()}"/>
			</h:form>
			
		</p:panel>
	</p:panel>
</h:body>
</html>